[map] open street map plugin

0 favourites
From the Asset Store
Isometric Stategy Roleplay Game Building and Streets Pack.
  • osm plugin v1

    by this plugin u can use open street map in yout project.

    features:

    1- set the location and zoom to the map(map focus).

    2- add markers with default icon and custom icon.

    3- add information to marker.

    4- get location and information about clicked marker.

    5-delete all marker.

    6- draw circle at specific location with custom color.

    7- retrieve current map zoom.

    8- change the zoom of the map.

  • hmm, need to have a look into it. Looking into the screenshots above I got instantly a nice idea of what to develop with this plugin

  • Thank you very much for this.

    Is it possible to generate the project file for the latest Constructor 2 stable version? (v173).

    Thank you!

  • I have a few new ideas for the plugin:

    • leaflet clusters
    • radius search (set central point or user geolocation)
  • The plugin works perfectly in preview mode, but exported it breaks down..

    I tried all settings, minified, not minified, all scaling modes, but the result is the same..

    The map goes crazy..

  • Looks pretty good, congrats .

  • hussein export not working.

    In c2runtime.js, it showed <Uncaught TypeError: undefined is not a function>.

    Could you check it?

  • it works nicely with Intel XDK, and exported to Android, works perfectly.

  • i still don't understand how to make a map with some defined points, (markers) and how to add the realtime position of the user (marker geolocation) in the same map

  • i still don't understand how to make a map with some defined points, (markers) and how to add the realtime position of the user (marker geolocation) in the same map

    The function to add a marker requires string inputs, not numbers. If you have a variable that's a number, write it like this: str(variable).

    The icon path needs to reference an image, or can be a base64 text string placed between quotation marks, ("data:image/png;base64,iVBORw0K..."). You can copy a Google image url, the url might be the base64 string.

    Then enter the icon size either as a string variable or a number between quotes ("20").

  • hussein

    Great plugin. The map, adding markers and circles works on Android via the cordova export/intel xdk compiler.

    When tapping on a maker, the output string parses the lat/lng/description using the "-" symbol. This causes a problem when I parse the string using the "tokenat" function and there are negative lat/lng. Could you change the symbol to something else?

    The function to remove markers doesn't work on circles. Would it be possible to modify the code so that circles and markers can be added, selected, and removed at any time? Would it be possible to add a function where the center of the map can be read, or a marker added on map touch?

    Thanks again for this plugin.

  • actually i did this

    so i have my own map with my own points i created in google map

    BUT im stuck with this:

    i JUST want to add the user position (gps) in that map i use iframe+osm

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • hmott

    Can you guys teach me how to add a marker & description to it ?

    Thank YOU

  • hussein

    I needed this in my app but it was outdated and had a few minor issues. For example the zoom didnt work properly due to the way you had been setting the width and height of the map. I wanted to share it with you and whomever needs it so I uploaded it to my cloud.

    Below is the download link for the updates I made to your code. I adjusted the version to 1.1 as well.

    https://lockegames.com/cloud/data/public/osm_h1k3

    Radulepy

    The updates I made, now add a popup description to markers.

  • hussein

    I needed this in my app but it was outdated and had a few minor issues. For example the zoom didnt work properly due to the way you had been setting the width and height of the map. I wanted to share it with you and whomever needs it so I uploaded it to my cloud.

    Below is the download link for the updates I made to your code. I adjusted the version to 1.1 as well.

    https://lockegames.com/cloud/data/public/osm_h1k3

    Radulepy

    The updates I made, now add a popup description to markers.

    Thank you for this update!

    I will probably need this in the future.

    I have tested it and have the problem that when i change the zoom value in the "set focus" command nothing changes? It stays always the same view.

    Do you have an idea why?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)