-
Add image over map
Hello,
I want to add a small image over the map and allow the user to move the map (keeping the image static while moving the map). Then when the user taps the image, take the point where the image is on the map and add the image to it (maybe using createPoi()). Is this possible?
Thanks,
Fabian
-
Re: Add image over map
Hi Fabian,
it should be pretty easy. Just position your image with "position: absolute" over the canvas. Then as you already pointed out you can use the createPoi to create a poi. You can easily calculate the lot/lang of the poi considering the center of the map (x,y and longitude, latitude of it are known) and the x,y coordinates of your image.
Br,
Leo
-
Re: Add image over map
Is it possible to have the image zoom in/out based on the map zoom level?
I want to overlay the map with an image that occupies a specific area on the map (e.g. like a building).
Thanks
Tom
-
Re: Add image over map
Go
[url]http://api.maps.nokia.com/2.0.0/apireference/symbols/nokia.maps.gfx.Graphics.html[/url]
for more detail.
-
Re: Add image over map
Hi Tom,
I'm not sure how to understand you. Do you want to show an image only for specific zoom levels? Could you please give a more precise example?
Leo
-
Re: Add image over map
Isn't a shape a better fit for that kind of functionality? As i recently learned, you can use a shapeclick listener as well.
Otherwise you might want to use the mapzoomchange listener to check when the map zoom level has changed, and change your image properties accordingly.
-
Re: Add image over map
Yes, I want it to act like a shape (shapes resize with zoom level because its shape and size are based on geolocations not pixels), but I need the details of an image.
I can listen to the mapzoomchange event, but the only way I know of putting an image on a map is via a poi, but pois are always the same size no matter what zoom level.
So I don't know how to put an image on the map which occupies the same geospace regardless off the zoom level. For example if I overlay the image of a football stadium, the more I zoom in the more of the stadium I will see and when I zoom out it will become so small that you can't see it.
-
Re: Add image over map
Every poi has a property "scale" which you can increase/decrease depending on your needs. 1 means original size and e.g. 0.5 is scaled down by two.
Leo
-
Re: Add image over map