Comments (12)
HI @Mushaqdeen-J!
Thank you, can you provide me an example?
from angular-mapboxgl-directive.
http://demo.empower-erp.com:88/sms-screen/index.html#/details/5001
Please check this url and make it zoom in or out
from angular-mapboxgl-directive.
Hi @Mushaqdeen-J!
Well, I think the problem is marker object. In Mapbox GL, the (0, 0) point in a marker is top-left corner, not the center of the image. Then, when you create a marker, you have to do something like:
$scope.markers = [
{
coordinates: [lng, lat],
element: DOMElement, // ex: div with image 30x30px
options: {
offset:[-15, -15] // this values are width/2 and height/2 of image dimensions
}
}
];
Tell me if it worked and if i can help you with something more!
P.D: Meybe you prefer to use glSources and glLayers directives!
from angular-mapboxgl-directive.
Hi @Mushaqdeen-J!
Did you solve the problem?
from angular-mapboxgl-directive.
Hi
options: { offset:[-15, -15] // this values are width/2 and height/2 of image dimensions }
fixed the problem, Now its working fine. Now I want to fit two markers in a view bound. Is there any directive to do that.
from angular-mapboxgl-directive.
Hi @Mushaqdeen-J!
I think that directive you are looking for is glMaxBounds, but I don't understand what you want to do.
from angular-mapboxgl-directive.
Oh sorry, what I want is I set my zoom as 12 and I placed two markers in my map but the two markers are not in my zoom level anyway I want to change my zoom level to fit the markers in my zoom level
from angular-mapboxgl-directive.
Well, I think if you use glMaxBounds directive, you can do it.
I hope I have helped you.
from angular-mapboxgl-directive.
Where can I have the documentation for this directive?
https://naimikan.github.io/angular-mapboxgl-directive/#/examples/simple_map
This is the link I am using for reference, but in this link there is no directive like gl-max-bounds
from angular-mapboxgl-directive.
Oh, sorry, I'm working on example page.
You can find here my (incomplete) wiki, or here for mapbox-gl example.
from angular-mapboxgl-directive.
No luck check the below link
http://demo.empower-erp.com:88/sms-screen/index.html#/details/5014
from angular-mapboxgl-directive.
Hi @Mushaqdeen-J!
Did you solve the problem? Maybe this example helps you.
from angular-mapboxgl-directive.
Related Issues (20)
- Navigation control does not work HOT 4
- Invalid source ID HOT 1
- Markers lose its position during scroll HOT 6
- How can I use an image as an icon-image for the 'unclustered-point' layer? HOT 1
- Map doesn't handle data changes after any events HOT 2
- Save and load polygon drawn with mapbox draw tool
- Angular 2 Support? HOT 3
- Question: Clean source and layer HOT 3
- How to get information about the line which was clicked? HOT 6
- Map events are not $broadcast inside an $apply HOT 3
- Leaflet Instance HOT 1
- A way to set map dimensions
- Help need to retrieve zoom level HOT 1
- Question: Is there a simple way to get a reference to the underlying map? HOT 3
- click event for custom markers
- How do I get bounds of the current map HOT 1
- Broken Example Link
- Directions control doesn't show path
- Whether to support the mapbox latest version
- Fullscreen button
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-mapboxgl-directive.