I'm creating a map app. I'm using leafletJS inside a webview in android. The functionally is great, except from the blue marker which should be om my map. In a PhoneGap application my marker shows, as well in a browser. But not inside a android webview. The small shadow that belongs to the marker shows. But not the pin. See screenhot: https://trello-attachments.s3.amazonaws.com/5193cd574768e0d07e000189/519699303ef843e86500742e/08e7b43f12c3e6d1ffcf02f8ba6919c6/Screenshot_2013-05-15-22-28-47-1.png
How come?
See code:
http://pastebin.com/EJXz9Run (index.html)
http://pastebin.com/JGXjTmz4 (js/leaflet.js)
It seems that the marker icon is missing. Download leaflet maps from here: http://leafletjs.com/download.html and be sure that you use /dist/images/marker-icon.png
Related
I'm using google maps SDK in swift 4, everything is perfect, but..
I need to allow the user to tap on Google control button as the image below:
Google control button image
My question is how to drop the a marker from my app map to google maps app with specific coordinates.
Thanks.
As far as I know you cannot override that button.
You're better off using a different button that opens a url. as per https://developer.apple.com/documentation/uikit/uiapplication/1648685-open
You can then include the marker coordinates as a query in your url, which will add a marker to the map.
eg. https://www.google.com/maps/search/?api=1&query=-33.830114,151.219235
this is as per: https://developers.google.com/maps/documentation/urls/guide
I have an app that integrates Google maps (successfully) and I added a few markers (5 at most). They display just fine, each one is also given a label since they're added by "AddMarker2", but what I'd really need is that specific label to be shown (visible) at all times.
I get each of them visible by clicking on the marker bubble, but I'd need to see all those labels without clicking anything, how can this be done?
I use javaFX 8 with Openlayers 3 in a webview.
Whenever i try to drag the mouse it works for only a small distance (maybe the tile thats loaded on application start?).
After that i seem to grab the entire map tile image (like you can do e.g. in chrome with normal images) and i can move it out of the application screens border.
Because of this i can not move the map around.
Any idea what could cause this or how i could start debugging? Openlayers inspected via weinre throws no js errors it seems, javaFX itself is completely new to me and i get no default errors as well.
Ok, even when you haven't got the problem any more as you are using different tools, for the record:
What for me seems to be working is to define the divfor the map with the ondragstart handler like this:
<div id="map" ondragstart="javascript: return false;"></div>
It seems that in OL 3.1.1 sometimes the start of a drag bubbles up to the WebView as it receives a drag detected event and this starts the image drag. This did not happen in OL 3.0.0
Defining the div like that helped in my case.
is it possible to add images to a google map pin's info window? i want to display a picture when the user taps the pin at a specified location. in Google's maps API i can only change the marker (pin) icon and thus replace the marker with another image. however, i want to be able to display the imag with the name of the place in the info window that appears when the user taps the marker.
Try to put it inside a
infowindow.setContent('<div><img src="rute.jpg" /></div>');
infowindow.open(map,marker);
I hope it helps.
Check out the google maps API documentation too, there's a lot of infomration.
https://developers.google.com/maps/documentation/javascript/
I have a problem with jqm and google map.
I want to use a dialog to get the user's address input and translate the address to lat and lng and set the map's center to the location.
I use google geocode service and set center function, the problem is:
When I use safari of iphone4, and chrome desktop version, it is ok, but I use chrome mobile version or firefox ver 15 16 17 even 18 on my android phone(HTC THUN DERBOLT ), the map can not display completely, it only load part map and the style of map,such as the tool bar at right top map become unnormal.
In addition there exist a strange problem, if I set the textbox with a initial value, and I don't change the value, the map can display correctly, if I input my address, the google geocode service can get the lat and
lng data but the map seems collapse, it only dispaly part of map and can not drag to the center of the screen.
What happened and how can I fix it? thank u.
A link with code and screenshot:
http://forum.jquery.com/topic/jquery-mobile-dialog-and-google-map-problem.